function rep_point = gs_reppoint(xp,yp,Emax,Emin,eEmax,eEmin,Phi,d0,fls,u0,v0,eu0,ev0,omeg,eomeg)
%
%rep_point = gs_reppoint(xp,yp,Emax,Emin,eEmax,eEmin,Phi,d0,fls,u0,v0,eu0,ev0,omeg,eomeg)
%
% Generation of the report on a single-point calculation.
% This is a grid_strain/strain_zero auxiliary function.
%
% See also gs_strashow, StrainZero.

% G. Teza, 2008, 2011, 2022.

TrE = Emax+Emin;
if abs(TrE) > 100*eps
     ShE = (Emax-Emin)/TrE;
else
     ShE = NaN;
end
SIE = sqrt(Emax.^2+Emin.^2);
if Emax >= 0
    typema = '(EXTENSION)';
else
    typema = '(COMPRESSION)';
end
if Emin >= 0
    typemi = '(EXTENSION)';
else
    typemi = '(COMPRESSION)';
end
if fls == 2
    signif = '*** HIGH SIGNIFICANCE LEVEL ***';
elseif fls == 1
    signif = '*** MID SIGNIFICANCE LEVEL ***';
else
    signif = '*** LOW SIGNIFICANCE LEVEL ***';
end
rep_point = sprintf(...
    '\n%s:\n %s%f m;\n %s%f m.\n\n%s (%s: %.0f m):\n %s%0.5g 1/y %s%s%0.5g 1/y;\n %s%0.5g 1/y %s%s%0.5g 1/y;\n %s%2.3f rad (%3.3f�);\n %s%0.5g 1/y;\n %s%f;\n %s%0.5g 1/y.\n\n%s \n\n %s%g m/y %s%g m/y;\n %s%g m/y %s%g m/y; \n %s%g rad %s%g rad. \n',...
    'POINT COORDINATES',...
    'East : ',xp,'North: ',yp,...
    'STRAIN RATES','SCALE FACTOR',d0,...
    'MAXIMUM: ',Emax,typema,' - ERROR: ',eEmax,...
    'MINIMUM: ',Emin,typemi,' - ERROR: ',eEmin,...
    'AZIMUTH OF MAXIMUM STRAIN DIRECTION: ',Phi,180*Phi/pi,...
    'RATE OF CHANGE-IN-AREA (TRACE OF STRAIN RATE TENSOR): ',TrE,...
    'NORMALIZED SHEAR: ',ShE,...
    'SECOND INVARIANT OF STRAIN RATE: ',SIE,...
    signif,...
    'VELOCITY - East: ',u0,' - ERROR: ',eu0,...
    'VELOCITY - North: ',v0,' - ERROR: ',ev0,...
    'RIGID BODY ROTATION: ',omeg,' - ERROR: ',eomeg);